Top 10k strings from Minesweeper (1997)(CSSCGC).z80
in <root> / bin / z80 / software / Sinclair Spectrum Collection TOSEC.exe / Sinclair ZX Spectrum - Games / [Z80] /
Back to the directory listing
2 Clear around a square 1 y=y+(a$="A" 1 y,x;q(y,x); 1 x=x+(a$="P" 1 u=no. of squares left to clear; v=no. of unflagged mines 1 u()=(65536 1 q=number of mines adjacent to each square, or q=9 if the square itself is mined 1 q(start square) is guaranteed to be 0 1 q(b,a)=q(b,a)+(q(b,a) 1 don't put the 1 clause here, to avoid the needless overhead of subroutine calls 1 b=q(d,c)=9 1 White = uncovered 1 Uncover square 1 Stepped on a mine 1 See chapter 18 of the Spectrum manual for an explanation of these functions 1 Reset timer 1 Print minefield 1 Mark/unmark square 1 Initialise 1 Green = unknown 1 Cyan = marked 1 Colour scheme: 1 Caps lock on 1 All mines cleared 1 ;"Well done! Minefield cleared" 1 ;"Time: ";time;"s" 1 ;"Minesweeper",,, 1 ;"Mines: ";mines 1 '''"Press any key to start." 1 '''"Keys Q, A, O, P move the cursor." 1 ''"Pressing M or N on a cleared" 1 ''"Press M (""mine"") to mark/unmark a square." 1 '"Press N (""no mine"") to clear a square." 1 "square will mark or clear all its neighbours." 1 "Select level (1-8): ";mines 1 "Practice mode? (Yes/No)" 1 "Generating minefield..." 1 to restart the game without generating a new minefield